----------------------------------------------------------------------------------
-- Company: 
-- Engineer: 
-- 
-- Create Date:    16:01:34 03/02/2012 
-- Design Name: 
-- Module Name:    RegistroInterrupciones - Behavioral 
-- Project Name: 
-- Target Devices: 
-- Tool versions: 
-- Description: 
--
-- Dependencies: 
--
-- Revision: 
-- Revision 0.01 - File Created
-- Additional Comments: 
--
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

---- Uncomment the following library declaration if instantiating
---- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity RegistroInterrupciones is
    Port ( PC_IN : in  STD_LOGIC_VECTOR (9 downto 0);
           ZF_IN : in  STD_LOGIC;
           CF_IN : in  STD_LOGIC;
           clk : in  STD_LOGIC;
           reset : in  STD_LOGIC;
           loadEnable_Interrupt : in  STD_LOGIC;
           PC_OUT : out  STD_LOGIC_VECTOR (9 downto 0);
           ZF_OUT : out  STD_LOGIC;
           CF_OUT : out  STD_LOGIC);
end RegistroInterrupciones;

architecture Behavioral of RegistroInterrupciones is

begin
	process (clk) begin
		if (rising_edge(clk)) then
			if (reset = '1') then
				ZF_OUT <= '0';
				CF_OUT <= '0';
			elsif (loadEnable_Interrupt = '1') then
				PC_OUT <= PC_IN;
				ZF_OUT <= ZF_IN;
				CF_OUT <= CF_IN;
			end if;
		end if;
	end process;
end Behavioral;

